from odoo import models, fields, api, _, Command
from odoo.exceptions import ValidationError
import json

class StockSubconOutside(models.Model):
    _inherit = 'stock.subcon.outside'

    def action_send_mes(self):
        if self.sync_json:
            data = json.loads(self.sync_json)
            self.env['s.mes.upload'].with_delay(description='外发接收同步mes').upload_data(data)
